<%@ page language="java" contentType="text/html; utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="fly-footer">
  <p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
  <p>
    <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
    <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
    <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
  </p>
</div>

<script src="/fly-3.0/res/mods/md5.js" type="text/javascript"></script>
<script src="/fly-3.0/res/mods/login.js" type="text/javascript"></script>
<script src="/fly-3.0/res/layui/layui.js"></script>
<script>
  <c:choose>
    <c:when test="${empty sessionScope.user}">
  layui.cache.user = {
      username: '游客'
      ,uid: -1
      ,avatar: ''
      ,experience: 0
      ,sex: 0
  };
  layui.cache.page = 'index';
  layui.config({
      version: "3.0.0"
      ,base: '/fly-3.0/res/mods/'  //这里实际使用时，建议改成绝对路径
  }).extend({
      fly: 'index'
  }).use('fly');
    </c:when>
    <c:otherwise>
  layui.cache.user = {
      username: '${sessionScope.user.userName}'
      ,uid: ${sessionScope.user.userId}
      ,avatar: '${sessionScope.user.userHeadImage}'
      ,experience: 83
      ,sex: ${sessionScope.user.userSex}
  };
  layui.cache.page = '${pageModule}';
  layui.config({
      version: "3.0.0"
      ,base: '/fly-3.0/res/mods/'  //这里实际使用时，建议改成绝对路径
  }).extend({
      fly: 'index'
  }).use('fly');
  </c:otherwise>
  </c:choose>

</script>

